<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Grupo12daturma2MIEIC4: Referência ao ficheiro C:/Users/Paulo/Documents/FEUP/EclipseWorkSpace/calgrafos/src/Auxiliar.h</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript">
$(document).ready(initResizable);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Gerado por Doxygen 1.7.4 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Localizar');
--></script>
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Grupo12daturma2MIEIC4&#160;<span id="projectnumber">1.0</span></div>
  </td>
 </tr>
 </tbody>
</table>
</div>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Página&#160;principal</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Ficheiros</span></a></li>
      <li id="searchli">
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Localizar" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>Lista&#160;de&#160;ficheiros</span></a></li>
      <li><a href="globals.html"><span>Ficheiros&#160;membro</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('_auxiliar_8h.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#func-members">Funções</a>  </div>
  <div class="headertitle">
<div class="title">Referência ao ficheiro C:/Users/Paulo/Documents/FEUP/EclipseWorkSpace/calgrafos/src/Auxiliar.h</div>  </div>
</div>
<div class="contents">
<div class="textblock"><code>#include &lt;string&gt;</code><br/>
<code>#include &lt;vector&gt;</code><br/>
<code>#include &lt;iostream&gt;</code><br/>
<code>#include &lt;sstream&gt;</code><br/>
<code>#include &lt;stdlib.h&gt;</code><br/>
<code>#include &lt;math.h&gt;</code><br/>
</div>
<p><a href="_auxiliar_8h_source.html">Ir para o código fonte deste ficheiro.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="func-members"></a>
Funções</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_auxiliar_8h.html#a864809bdda3de5f40e7dc591a77e9f4c">separador</a> (const string &amp;linha, vector&lt; string &gt; &amp;resultado, const string &amp;separadores)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Funções globais auxiliares.  <a href="#a864809bdda3de5f40e7dc591a77e9f4c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_auxiliar_8h.html#a897e5cf8f97c84d107c2d83e970cb15e">stringParaInteiro</a> (string str)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Função auxiliar que verifica se uma string é um número inteiro, e que o devolve.  <a href="#a897e5cf8f97c84d107c2d83e970cb15e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_auxiliar_8h.html#a59a4f9fe2b05e64663bef8f0bef40ca6">intToString</a> (int n)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Transforma um inteiro em string.  <a href="#a59a4f9fe2b05e64663bef8f0bef40ca6"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_auxiliar_8h.html#ac968476bd197b7251fa7f8fd3f6cd227">haversine_m</a> (double lat1, double long1, double lat2, double long2)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Calcula a distância entre 2 posições geográficas.  <a href="#ac968476bd197b7251fa7f8fd3f6cd227"></a><br/></td></tr>
</table>
<hr/><h2>Documentação das funções</h2>
<a class="anchor" id="ac968476bd197b7251fa7f8fd3f6cd227"></a><!-- doxytag: member="Auxiliar.h::haversine_m" ref="ac968476bd197b7251fa7f8fd3f6cd227" args="(double lat1, double long1, double lat2, double long2)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">double haversine_m </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>lat1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>long1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>lat2</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>long2</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Calcula a distância entre 2 posições geográficas. </p>
<p>Calcula a distância entre 2 posições geográficas. Código obtido de <a href="http://stackoverflow.com/questions/365826/calculate-distance-between-2-gps-coordinates">http://stackoverflow.com/questions/365826/calculate-distance-between-2-gps-coordinates</a> </p>

<p>Definido na linha <a class="el" href="_auxiliar_8cpp_source.html#l00070">70</a> do ficheiro <a class="el" href="_auxiliar_8cpp_source.html">Auxiliar.cpp</a>.</p>

<p>Referências <a class="el" href="_auxiliar_8cpp_source.html#l00017">d2r</a>.</p>

<p>Referenciado por <a class="el" href="mapas_8cpp_source.html#l00156">mapa::processaMapa()</a>.</p>

</div>
</div>
<a class="anchor" id="a59a4f9fe2b05e64663bef8f0bef40ca6"></a><!-- doxytag: member="Auxiliar.h::intToString" ref="a59a4f9fe2b05e64663bef8f0bef40ca6" args="(int n)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">string intToString </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>n</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Transforma um inteiro em string. </p>

<p>Definido na linha <a class="el" href="_auxiliar_8cpp_source.html#l00061">61</a> do ficheiro <a class="el" href="_auxiliar_8cpp_source.html">Auxiliar.cpp</a>.</p>

<p>Referenciado por <a class="el" href="_data_cal_8cpp_source.html#l00063">DataCal::getData()</a> e <a class="el" href="_veiculo_8cpp_source.html#l00048">Veiculo::guardar()</a>.</p>

</div>
</div>
<a class="anchor" id="a864809bdda3de5f40e7dc591a77e9f4c"></a><!-- doxytag: member="Auxiliar.h::separador" ref="a864809bdda3de5f40e7dc591a77e9f4c" args="(const string &amp;linha, vector&lt; string &gt; &amp;resultado, const string &amp;separadores)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void separador </td>
          <td>(</td>
          <td class="paramtype">const string &amp;&#160;</td>
          <td class="paramname"><em>linha</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">vector&lt; string &gt; &amp;&#160;</td>
          <td class="paramname"><em>resultado</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const string &amp;&#160;</td>
          <td class="paramname"><em>separadores</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Funções globais auxiliares. </p>
<p>Função que separa uma string em substrings divididas por um separador devolve o resultado num vector. </p>

<p><p>Ignorar os primeiros separadores.</p>
<p>Encontra 1º caracter útil</p>
<p>Encontrado um valor delimitado, guardar no resultado</p>
<p>Saltar os separadores</p>
<p>Início do próximo dado útil </p>
</p>

<p>Definido na linha <a class="el" href="_auxiliar_8cpp_source.html#l00019">19</a> do ficheiro <a class="el" href="_auxiliar_8cpp_source.html">Auxiliar.cpp</a>.</p>

<p>Referenciado por <a class="el" href="_dados_8cpp_source.html#l00026">Dados::carregarDados()</a>, <a class="el" href="_cliente_8cpp_source.html#l00022">Cliente::Cliente()</a>, <a class="el" href="_consulta_8cpp_source.html#l00022">Consulta::Consulta()</a>, <a class="el" href="_data_cal_8cpp_source.html#l00028">DataCal::DataCal()</a>, <a class="el" href="_dados_8cpp_source.html#l00098">Dados::escreverDados()</a>, <a class="el" href="_data_cal_8cpp_source.html#l00105">DataCal::operator=()</a> e <a class="el" href="_veiculo_8cpp_source.html#l00016">Veiculo::Veiculo()</a>.</p>

</div>
</div>
<a class="anchor" id="a897e5cf8f97c84d107c2d83e970cb15e"></a><!-- doxytag: member="Auxiliar.h::stringParaInteiro" ref="a897e5cf8f97c84d107c2d83e970cb15e" args="(string str)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int stringParaInteiro </td>
          <td>(</td>
          <td class="paramtype">string&#160;</td>
          <td class="paramname"><em>str</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Função auxiliar que verifica se uma string é um número inteiro, e que o devolve. </p>

<p>Definido na linha <a class="el" href="_auxiliar_8cpp_source.html#l00032">32</a> do ficheiro <a class="el" href="_auxiliar_8cpp_source.html">Auxiliar.cpp</a>.</p>

<p>Referenciado por <a class="el" href="_dados_8cpp_source.html#l00026">Dados::carregarDados()</a>, <a class="el" href="_data_cal_8cpp_source.html#l00028">DataCal::DataCal()</a> e <a class="el" href="_data_cal_8cpp_source.html#l00105">DataCal::operator=()</a>.</p>

</div>
</div>
</div>
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="_auxiliar_8h.html">Auxiliar.h</a>      </li>
      <li class="footer">Gerado em Fri May 13 2011 02:00:25 para Grupo12daturma2MIEIC4 por&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>Tudo</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Ficheiros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Funções</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variáveis</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Amigos</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Macros</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>


</body>
</html>
